package com.ycx.furns.utils;

import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;

public class WebUtils {
    public static boolean isAjaxRequest(ServletRequest req){
//        X-Requested-With: XMLHttpRequest
        HttpServletRequest request = (HttpServletRequest)req;
        return "XMLHttpRequest".equals(request.getHeader("X-Requested-With"));

    }
}
